﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TodoApp.ResultModel;
using TodoApp.TMS_personnelmatters.Employeess;
using TodoApp.TMS_SetUp.Departments;
using TodoApp.TMS_SetUp.Positions;
using Volo.Abp.Application.Services;

namespace TodoApp.TMS_personnelmatters.Inductions
{
    public class TMS_InductionService: ApplicationService
    {
        private readonly ITMS_InductionRepository _tMS_InductionRepository;
        public TMS_InductionService(ITMS_InductionRepository tMS_InductionRepository)
        {
            _tMS_InductionRepository = tMS_InductionRepository;
        }
        /// <summary>
        /// 显示分页
        /// </summary>
        /// <param name="name"></param>
        /// <param name="department"></param>
        /// <param name="position"></param>
        /// <param name="date"></param>
        /// <param name="dates"></param>
        /// <param name="state"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public async Task<PageResponse<TMS_InductionDto>> GetInduction(string name, string department, string position, string date, string dates, int? state, int pageindex, int pagesize)
        {
            return await _tMS_InductionRepository.GetInduction(name, department, position, date, dates, state, pageindex, pagesize);
        }
        public async Task<int> DeleteInduction(string id)
        {
            return await _tMS_InductionRepository.DeleteInduction(id);
        }
        public async Task<int> UpdateInduction(TMS_InductionDto tMS_Induction)
        {
            return await _tMS_InductionRepository.UpdateInduction(tMS_Induction);
        }
        public async Task<int> CreateInduction(TMS_Induction tMS_Induction)
        {
            return await _tMS_InductionRepository.CreateInduction(tMS_Induction);
        }
        public async Task<List<TMS_Department>> GetDepartment()
        {
            return await _tMS_InductionRepository.GetDepartment();
        }
        public async Task<List<TMS_Position>> GetPosition(string id)
        {
            return await _tMS_InductionRepository.GetPosition(id);
        }
        public async Task<int> UpdateState(string id)
        {
            return await _tMS_InductionRepository.UpdateState(id);
        }
        public async Task<List<TMS_Employees>> GetEmployees()
        {
            return await _tMS_InductionRepository.GetEmployees();
        }
        public async Task<List<TMS_Employees>> GetEmployeess(string id)
        {
            return await _tMS_InductionRepository.GetEmployeess(id);
        }
    }
}
